package com.hulytu.invasion.component;

import android.app.Activity;
import android.os.Bundle;

import com.hulytu.invasion.plugin.ActivityEnhancePlugin;

public abstract class BaseActivityEnhancePlugin<T extends Activity>
        extends BaseEnhancePlugin<T>
        implements ActivityEnhancePlugin<T> {

    private Class<T> clazz;

    @SuppressWarnings("unchecked")
    @Override
    public void init(T host) {
        super.init(host);
        if (host == null) return;

        Class<T> clazz = (Class<T>) host.getClass();
        setHostClass(clazz);
    }

    @Override
    public void setHostClass(Class<T> clazz) {
        this.clazz = clazz;
    }

    @Override
    public Class<T> getHostClass() {
        return clazz;
    }

    @Override
    public void onCreated(T activity, Bundle bundle) {

    }

    @Override
    public void onResumed(T activity) {

    }

    @Override
    public void onStopped(T activity) {

    }

    @Override
    public void onPaused(T activity) {

    }

    @Override
    public void onStarted(T activity) {

    }

    @Override
    public void onDestroyed(T activity) {

    }
}
